﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WpfFeeCalculator.FeeWcfService;
using WpfFeeCalculator.Model;


namespace WpfFeeCalculator.Controllers
{
    public class PriceCutOffController : IPriceCutOffController
    {
        private readonly IFeeFacade webservice;

        public PriceCutOffController(IFeeFacade phoenixFacade)
        {
            webservice = phoenixFacade;
        }

        public Task<List<PriceCutOff>> GetPriceCutOffsForPortfolio(int portfolioId)
        {
            var task = webservice.GetPriceCutOffsForPortfolio(portfolioId);
            return task;
        }

        public IObservable<System.Reactive.EventPattern<GetPriceCutOffsCompletedEventArgs>> GetPriceCutOffsForPortfolioAsync(int portfolioId)
        {
            return webservice.GetPriceCutOffsForPortfolioAllAsync(portfolioId);
        }
       
    }
}
